{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ncjQuwOgT4W3"
      },
      "source": [
        "# 🗣️ ChatTTS-Forge Colab\n",
        "\n",
        "👋 This script is built based on [ChatTTS-Forge](https://huggingface.co/spaces/lenML/ChatTTS-Forge). If this project is helpful to you, please consider giving us a star on GitHub for support! Contributions via PRs and issues are also welcome~\n",
        "\n",
        "Thank you for your support!\n",
        "\n",
        "## Running Guide\n",
        "\n",
        "1. In the menu bar, select **Runtime**.\n",
        "2. Click **Run all**.\n",
        "\n",
        "After the execution is complete, look for the following information in the logs below:\n",
        "\n",
        "```\n",
        "Running on public URL: https://**.gradio.live\n",
        "```\n",
        "\n",
        "This link is the public URL you can access.\n",
        "\n",
        "> Note: If you are prompted to restart while installing packages, please select \"No\".\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "09UPJy1gP045"
      },
      "outputs": [],
      "source": [
        "# 1. Clone the repository\n",
        "!git clone https://github.com/lenML/ChatTTS-Forge\n",
        "\n",
        "# 2. Change directory to the repository\n",
        "%cd ChatTTS-Forge\n",
        "\n",
        "# 3. Install ffmpeg and rubberband-cli\n",
        "!apt-get update -y\n",
        "!apt-get install -y ffmpeg rubberband-cli\n",
        "\n",
        "# 4. Install PyTorch\n",
        "!pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113\n",
        "\n",
        "# 5. Install dependencies\n",
        "!pip install -r requirements.txt\n",
        "\n",
        "# 6. download models\n",
        "!python -m scripts.download_models --source huggingface\n",
        "\n",
        "# 7. Run the web interface\n",
        "!python webui.py --share --language=en\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "hLupWhOXT1kt"
      },
      "source": []
    }
  ],
  "metadata": {
    "accelerator": "GPU",
    "colab": {
      "gpuType": "T4",
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}
